﻿using project1113.SomeTools;
using System.Windows;

namespace project1113.observer
{
    /// <summary>
    /// 观察器接口 -- zyx
    /// </summary>
    public interface IErrorObserver
    {
        //观察器接口
        public void HandleError(string errorMessage);
    }
    class Observe_err : IErrorObserver
    {
        public void HandleError(string errorMessage)
        {
            MessageBox.Show(errorMessage);
            StaticLogWrite.Logger.Log(LogLevel.Error, errorMessage);
        }
    }
    class Observe_info : IErrorObserver
    {
        public void HandleError(string errorMessage)
        {
            MessageBox.Show(errorMessage);
            StaticLogWrite.Logger.Log(LogLevel.Info, errorMessage);
        }
    }
}
